<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
     <title>医院管理系统</title>    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="医院管理">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<link href="jsTools/bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="stylesheet">
    <script type="text/javascript" src="jsTools/jquery-3.1.1.min.js"></script>
    <script type="text/javascript" src="jsTools/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
    
    <script type="text/javascript" src="jsTools/jquery-ui-1.12.1.custom/jquery-ui.js"></script> 
    <link href="jsTools/jquery-ui-1.12.1.custom/jquery-ui.css" rel="stylesheet"></link> 
   
    <script src="jsTools/jquery-validation-1.16.0/dist/jquery.validate.min.js"></script>
    <script src="jsTools/jquery-validation-1.16.0/dist/localization/messages_zh.js"></script>
    <script src="jsTools/jquery-validation-1.16.0/dist/additional-methods.js"></script>
  </head>
 	<body >
 		<div class="container-filed">
 			<div  class="row clearfix">
 				<div class="col-sm-offset-4 col-sm-1 column"></div>
 				<div class="col-sm-6 column ">
 				<ul class="nav nav-tabs" style="float: right;">
				<li id="sign">
				<c:if test="${penson.user==null}">
					<a href="javascript:open()" id="b_sign"  title="请登录">登录</a>
				</c:if>
				<c:if test="${penson.user!=null}">
				<img class="img-circle " src="${penson.headImage}" width="50" height="50" >
				<h4><span class="label label-info">昵称：${penson.user}</span></h4>
				</c:if>	 
					 
				</li>
				<li>
					 <a href="outsideJsp/out/out.in/register.jsp">注册</a>
				</li>
				<li>
					 <a href="outsideJsp/out/out.in/search.jsp">忘记密码</a>
				</li>
				<li >
					 <a href="#">信息</a>
				</li>
				<li>
					 <a href="DispatchAction.action?method=exit">退出</a>
				</li>
				<li>
					 <a href="workerSign.html">工作人员入口</a>
				</li>
				</ul>
				</div>
 			</div>
 		</div>
 	  <div class="container">
	<div class="row clearfix">
		<div class="col-md-12 column" >
		<ul class="nav nav-pills btn-group" >
				<li class="active">
					 <a href="javascript:change_fame('outsideJsp/in/page/news.jsp')">首页</a>
				</li>
				<li class="active">
					 <a href="javascript:change_fame('outsideJsp/in/forum/forum.jsp')">进入论坛</a>
				</li>
				<li class="active">
					 <a href="javascript:change_fame('outsideJsp/in/page/fileManage.jsp')">文件管理</a>
				</li>
				<li class="active">
					 <a href="javascript:change_fame('outsideJsp/in/consult/ConsultList.jsp')">在线咨询</a>
				</li>
				<li class="active">
					 <a href="javascript:change_fame('outsideJsp/in/order/onlineOrder.jsp')">在线预约</a>
				</li>
			</ul>
		</div>
	</div>
	<div id="signOne" title="请登录">
   				<form  class="form-horizontal" action="DispatchAction.action?method=register" method="post">
				<div class="form-group">
					 <br>
					 <label for="workerLogin" class="col-sm-4 control-label">账号</label>
					<div class="col-sm-5">
						<input class="form-control" id="workerLogin" name="login" type="text"  placeholder="账号" />
					</div>
				</div>
				<div class="form-group">
						
					 <label for="workerPassword" class="col-sm-4 control-label">密码</label><a href="outsideJsp/out/out.in/search.jsp">忘记密码</a>
					<div class="col-sm-5">
						<input class="form-control " id="workerPassword" name="password" type="password" placeholder="密码"/>
					</div>
				</div>
				
				<div class="form-group">
					<div class=" col-sm-offset-4 col-sm-8">
						 <button type="submit" class="btn btn-primary">登录</button>
						 <button type="reset" id="cancellation" class="btn btn-primary">重置</button>
					</div>
				</div>
			</form>
	</div>
		<div class="row clearfix">
		<div class="col-md-12 column">
		<iframe frameborder="0" id="fame" src="outsideJsp/in/page/news.jsp"  height="100%" width="100%"></iframe>
		</div>
</div>
	</div>	

	</body>
	<script type="text/javascript">
	function open()
	{$('#signOne').dialog('open');
	}
	
	 $(document).ready(	
		function(){
			$("#signOne form").validate({
			  submitHandler:function(form){
			  	$( "#signOne" ).dialog( "close" );	
			  	//导致有些浏览器卡顿		  	
				// $("#signOne form").submit();
			   var data=$('form').serialize();
			   $.post("DispatchAction.action?method=register",data,function(msg){
			   if(msg=='false') alert("账号或密码错误"); if(msg=='have') alert("您已在线"); if(msg=='true') {window.location.href="important.jsp";  } }
			   );
			 },
			  rules:{
				login:{required:true,
				rangelength:[2,7],
				//alphanumeric:true
				},
				password:{required:true,
				minlength:6},
			},
			errorElement: "em",
				errorPlacement: function ( error, element ) {
					// Add the `help-block` class to the error element
					error.addClass( "help-block" );

					// Add `has-feedback` class to the parent div.form-group
					// in order to add icons to inputs
					element.parents( ".col-sm-5" ).addClass( "has-feedback" );

					if ( element.prop( "type" ) === "checkbox" ) {
						error.insertAfter( element.parent( "label" ) );
					} else {
						error.insertAfter( element );
					}

					// Add the span element, if doesn't exists, and apply the icon classes to it.
					if ( !element.next( "span" )[ 0 ] ) {
						$( "<span class='glyphicon glyphicon-remove form-control-feedback'></span>" ).insertAfter( element );
					}
				},
				success: function ( label, element ) {
					// Add the span element, if doesn't exists, and apply the icon classes to it.
					if ( !$( element ).next( "span" )[ 0 ] ) {
						$( "<span class='glyphicon glyphicon-ok form-control-feedback'></span>" ).insertAfter( $( element ) );
					}
				},
				highlight: function ( element, errorClass, validClass ) {
					$( element ).parents( ".col-sm-5" ).addClass( "has-error" ).removeClass( "has-success" );
					$( element ).next( "span" ).addClass( "glyphicon-remove" ).removeClass( "glyphicon-ok" );
				},
				unhighlight: function ( element, errorClass, validClass ) {
					$( element ).parents( ".col-sm-5" ).addClass( "has-success" ).removeClass( "has-error" );
					$( element ).next( "span" ).addClass( "glyphicon-ok" ).removeClass( "glyphicon-remove" );
				}
			
			}
				);
		}
		);
   
  $(function() {
    $( "#signOne" ).dialog({
      autoOpen: false,
      width: 400,
      modal: true,
    });
    });
 
	
	function change_fame(src)
{
	$("iframe").attr("src",src);
}
$(document).ready(function(){
$("#get_head").click(function(){window.location.hash="#head";});
});
</script>
</html>
